package dry.example.gui;

import java.awt.Toolkit;
import java.awt.Dimension;

public class ScreenResolutionExample {

    public static void main(String[] args) {
        // 获取屏幕分辨率
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

        int width = screenSize.width;
        int height = screenSize.height;

        System.out.println("屏幕分辨率：");
        System.out.println("宽度: " + width + " 像素");
        System.out.println("高度: " + height + " 像素");
    }

}
